<template>
    <!-- 客户管理模块-客户税收居民身份声明文件页面 -->
    <div class="fillcontain">
        <!-- 标题 -->
        <div class="fastQuery">
            <el-row>
                <el-col :span="6" class="fastQuery_title">
                    <i class="el-icon-tickets"></i><span> 客户税收居民身份声明文件</span></el-col>
                <el-col :span="8"></el-col>
            </el-row>
        </div>
        <div class="contain">
            <el-form  label-width="120px" class="search_container">
                <el-row class="common-box">
                    <el-col :span="8">
                        <el-col :span="8" class="common-lab">
                            <label class="calname">姓名(投保人)</label>
                        </el-col>
                        <el-col :span="16">
                            <el-input disabled placeholder="" v-model="taxspf.calname" taxspf></el-input>
                        </el-col>
                    </el-col>
                </el-row>
                <el-row class="common-box">
                    <el-col :span="24" class="mt10 pb10">
                        <el-col :span="3" class="common-lab">
                            <label class="pflag pr15">本人声明：</label>
                        </el-col>
                        <el-col :span="21" class="text_left">
                            <el-radio-group v-model="taxspf.pflag" disabled>
                                <el-radio :label="3" disabled>仅为中国税收居民</el-radio>
                                <el-radio :label="6" disabled>仅为非居民</el-radio>
                                <el-radio :label="9" disabled>既是中国税收居民又是其他国家(地区)税收居民</el-radio>
                            </el-radio-group>
                        </el-col>
                    </el-col>
                    <el-col :span="8">
                        <el-col :span="8" class="common-lab">
                            <label class="susrname">姓(英文或拼音)</label>
                        </el-col>
                        <el-col :span="16">
                            <el-input disabled placeholder="" v-model="taxspf.susrname"></el-input>
                        </el-col>
                    </el-col>
                    <el-col :span="8">
                        <el-col :span="8" class="common-lab">
                            <label class="susrgname">名(英文或拼音)</label>
                        </el-col>
                        <el-col :span="16">
                            <el-input disabled placeholder="" v-model="taxspf.susrgname"></el-input>
                        </el-col>
                    </el-col>
                    <el-col :span="8">
                        <el-col :span="8" class="common-lab">
                            <label class="smoddate">出生日期</label>
                        </el-col>
                        <el-col :span="16">
                            <el-input disabled placeholder="" v-model="taxspf.smoddate"></el-input>
                        </el-col>
                    </el-col>
                </el-row>

                <el-row>
                    <el-col :span="24" class="mt10">
                        <div class="title">
                            <span>现居住地(境外地址无需填写中文地址栏)</span>
                        </div>
                    </el-col>
                    <el-col :span="24" class="mt10">
                        <el-col :span="1" class="text_right">中文栏</el-col>
                        <el-col :span="23">
                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="nationdc">国家</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.nationdc"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="sprovname">省</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.sprovname"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="scityname">市</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.scityname"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="12">
                                <el-col :span="6" class="common-lab">
                                    <label class="lngaddr01">现居详细地址</label>
                                </el-col>
                                <el-col :span="18">
                                    <el-input disabled placeholder="" v-model="taxspf.lngaddr01"></el-input>
                                </el-col>
                            </el-col>
                        </el-col>
                    </el-col>

                    <el-col :span="24" class="mt10">
                        <el-col :span="1" class="text_right">英文栏</el-col>
                        <el-col :span="23">
                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="nationabdc">国家</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.nationabdc"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="pprovname">省</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.pprovname"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="pcityname">市</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.pcityname"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="12">
                                <el-col :span="6" class="common-lab">
                                    <label class="lngaddr02">现居详细地址</label>
                                </el-col>
                                <el-col :span="18">
                                    <el-input disabled placeholder="" v-model="taxspf.lngaddr02"></el-input>
                                </el-col>
                            </el-col>
                        </el-col>
                    </el-col>
                </el-row>

                <el-row class="mt20">
                    <el-col :span="24" class="mt10">
                        <div class="title">
                            <span>出生地(境外地址无需填写中文地址栏)</span>
                        </div>
                    </el-col>
                    <el-col :span="24" class="mt10">
                        <el-col :span="1" class="text_right">中文栏</el-col>
                        <el-col :span="23">
                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="cntname">国家</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.cntname"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="provname">省</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.provname"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="city">市</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.city"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="12">
                                <el-col :span="6" class="common-lab">
                                    <label class="lngaddr03">出生详细地址</label>
                                </el-col>
                                <el-col :span="18">
                                    <el-input disabled placeholder="" v-model="taxspf.lngaddr03"></el-input>
                                </el-col>
                            </el-col>
                        </el-col>
                    </el-col>

                    <el-col :span="24" class="mt10">
                        <el-col :span="1" class="text_right">英文栏</el-col>
                        <el-col :span="23">
                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="crname">国家</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.crname"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="prodesc">省</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.prodesc"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="4">
                                <el-col :span="8" class="common-lab">
                                    <label class="citydesc">市</label>
                                </el-col>
                                <el-col :span="16">
                                    <el-input disabled placeholder="" v-model="taxspf.citydesc"></el-input>
                                </el-col>
                            </el-col>

                            <el-col :span="12">
                                <el-col :span="6" class="common-lab">
                                    <label class="lngaddr04">出生详细地址</label>
                                </el-col>
                                <el-col :span="18">
                                    <el-input disabled placeholder="" v-model="taxspf.lngaddr04"></el-input>
                                </el-col>
                            </el-col>

                        </el-col>
                    </el-col>
                </el-row>

                <el-row class="mt20">
                    <el-col :span="24" class="mt10">
                        <div class="title">
                            <span>税收居民国(地区)及纳税人居民号</span>
                        </div>
                    </el-col>
                    <el-col :span="24" class="pb10 mt10">
                        <el-col :span="8">
                            <el-col :span="8" class="common-lab">
                                <label class="sdesc01">税收居民国(地区)1</label>
                            </el-col>
                            <el-col :span="16">
                                <el-input disabled placeholder="" v-model="taxspf.sdesc01"></el-input>
                            </el-col>
                        </el-col>
                        <el-col :span="8">
                            <el-col :span="8" class="common-lab">
                                <label class="pedesc01">纳税人识别号1</label>
                            </el-col>
                            <el-col :span="16">
                                <el-input disabled placeholder="" v-model="taxspf.pedesc01"></el-input>
                            </el-col>
                        </el-col>
                    </el-col>
                    <el-col :span="24" class="pb10">
                        <el-col :span="8">
                            <el-col :span="8" class="common-lab">
                                <label class="sdesc02">税收居民国(地区)2</label>
                            </el-col>
                            <el-col :span="16">
                                <el-input disabled placeholder="" v-model="taxspf.sdesc02"></el-input>
                            </el-col>
                        </el-col>
                        <el-col :span="8">
                            <el-col :span="8" class="common-lab">
                                <label class="pedesc02">纳税人识别号2</label>
                            </el-col>
                            <el-col :span="16">
                                <el-input disabled placeholder="" v-model="taxspf.pedesc02"></el-input>
                            </el-col>
                        </el-col>
                    </el-col>
                    <el-col :span="24" class="pb10">
                        <el-col :span="8">
                            <el-col :span="8" class="common-lab">
                                <label class="sdesc03">税收居民国(地区)3</label>
                            </el-col>
                            <el-col :span="16">
                                <el-input disabled placeholder="" v-model="taxspf.sdesc03"></el-input>
                            </el-col>
                        </el-col>
                        <el-col :span="8">
                            <el-col :span="8" class="common-lab">
                                <label class="pedesc03">纳税人识别号3</label>
                            </el-col>
                            <el-col :span="16">
                                <el-input disabled placeholder="" v-model="taxspf.pedesc03"></el-input>
                            </el-col>
                        </el-col>
                    </el-col>
                </el-row>


                <el-row class="mt20">
                    <el-col :span="24">
                        <span class="pl20 pr20">如不能提供居民国(地区)信息，纳税人识别号，请选择原因</span>
                    </el-col>
                    <el-col :span="24" class="mt10 pl20 pr20">
                        <el-radio-group v-model="taxspf.reasons" disabled>
                            <el-radio :label="1">居民国(地区)不发纳税人识别号</el-radio>
                            <el-radio :label="2">账户持有人未能取得纳税人识别号，如此选项，请解释具体原因</el-radio>
                        </el-radio-group>
                    </el-col>
                    <el-col :span="24" class="mt20 pr20 pl20">
                        <el-input type="textarea" v-model="taxspf.pareason" disabled></el-input>
                    </el-col>
                </el-row>

                <el-row class="mt20">
                    <el-col :span="24" class="text_center">
                        <el-button type="danger" class="dangerbutton" @click="back">返回</el-button>
                    </el-col>
                </el-row>
            </el-form>
        </div>
    </div>
</template>
<script>
    import { mapState, mapGetters } from 'vuex'
    import constant from '@/utils/constant';
    import { queryIndividualTax } from "@/api/customermanage/customerManage.js";
    export default {
        data() {
            return {
                radio: 3,
                radios: 1,
                clntnum: '',
                taxspf: [],
            }
        },
        mounted() { //页面初始化方法
            this.getIndividualTax();
        },
        methods: {

            //个人税收居民身份声明文件
            getIndividualTax() {
                this.$store.dispatch('loading/CHNAGE_SUBLOADING', true)
                this.clntnum = this.$route.query.clntnum;
                let params = {
                    clntnum: this.clntnum
                }
                queryIndividualTax(params).then(res => {
                    this.$store.dispatch('loading/CHNAGE_SUBLOADING', false)
                    if (res.resultCode == constant.SUCCESS && res.data) {
                        this.taxspf = res.data;
                        console.log(res)
                    }
                    this.$emit('checkData', this.tableData.length > 0 ? true : false)
                }).catch(err => {
                    this.$emit('checkData', false)
                    this.$store.dispatch('loading/CHNAGE_SUBLOADING', false)
                })
            },
            back() {
                this.$router.go(-1);//返回上一层
            },
        },
        watch: {
            "$route": {
                handler(route) {
                    if (route.query.clntnum != undefined && route.query.clntnum != this.clntnum) {
                        this.getIndividualTax();
                    }
                }
            }
        }
    }

</script>

<style lang="less" scoped>
    .fillcontain {
        padding-bottom: 0;

        .fastQuery {
            padding: 15px 20px 10px 20px;
            background: #fff;
            border-bottom: 1px solid #e1e1e1;

            .fastQuery_title {
                color: #666;
                padding: 6px 0px;
            }
        }
    }

    .contain {
        background: #fff;
        padding: 10px;
        margin-bottom: 20px;
    }

    .common-box {
        padding-bottom: 15px;
    }

    .common-lab {
        line-height: normal!important;
        text-align: right;
        .labelName {
            text-align: right;
        }
    }
</style>